home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist6.3 / gl_dev.idb / usr / share / src / OpenGL / toolkits / libwidget / GLwDrawA.h.z / GLwDrawA.h
Encoding:
C/C++ Source or Header  |  1996-12-06  |  4.7 KB  |  154 lines

  1. #ifndef _GLwDrawA_h
  2. #define _GLwDrawA_h
  3.  
  4. #include <GL/glx.h>
  5. #include <GL/gl.h>
  6.  
  7. /****************************************************************
  8.  *
  9.  * GLwDrawingArea widgets
  10.  *
  11.  ****************************************************************/
  12.  
  13. /* Resources:
  14.  
  15.  Name             Class        RepType        Default Value
  16.  ----             -----        -------        -------------
  17.  attribList         AttribList        int *        NULL
  18.  visualInfo         VisualInfo        VisualInfo    NULL
  19.  installColormap     InstallColormap    Boolean        TRUE
  20.  allocateBackground  AllocateColors    Boolean        FALSE
  21.  allocateOtherColors AllocateColors    Boolean        FALSE
  22.  installBackground   InstallBackground    Boolean        TRUE
  23.  exposeCallback      Callback        Pointer        NULL
  24.  ginitCallback       Callback        Pointer        NULL
  25.  inputCallback       Callback        Pointer        NULL
  26.  resizeCallback      Callback        Pointer        NULL
  27.  
  28. *** The following resources all correspond to the GLX configuration
  29. *** attributes and are used to create the attribList if it is NULL
  30.  bufferSize         BufferSize        int        0
  31.  level             Level        int        0
  32.  rgba             Rgba        Boolean        FALSE
  33.  doublebuffer         Doublebuffer    Boolean        FALSE
  34.  stereo             Stereo        Boolean        FALSE
  35.  auxBuffers         AuxBuffers        int        0
  36.  redSize         ColorSize        int        1
  37.  greenSize         ColorSize        int        1
  38.  blueSize         ColorSize        int        1
  39.  alphaSize         AlphaSize        int        0
  40.  depthSize         DepthSize        int        0
  41.  stencilSize         StencilSize    int        0
  42.  accumRedSize         AccumColorSize    int        0
  43.  accumGreenSize         AccumColorSize    int        0
  44.  accumBlueSize         AccumColorSize    int        0
  45.  accumAlphaSize         AccumAlphaSize    int        0
  46. */
  47.  
  48. #define GLwNattribList        "attribList"
  49. #define GLwCAttribList        "AttribList"
  50. #define GLwNvisualInfo        "visualInfo"
  51. #define GLwCVisualInfo        "VisualInfo"
  52. #define GLwRVisualInfo        "VisualInfo"
  53.  
  54. #define GLwNinstallColormap    "installColormap"
  55. #define GLwCInstallColormap    "InstallColormap"
  56. #define GLwNallocateBackground    "allocateBackground"
  57. #define GLwNallocateOtherColors    "allocateOtherColors"
  58. #define GLwCAllocateColors    "AllocateColors"
  59. #define GLwNinstallBackground    "installBackground"
  60. #define GLwCInstallBackground    "InstallBackground"
  61.  
  62. #define GLwCCallback        "Callback"
  63. #define GLwNexposeCallback    "exposeCallback"
  64. #define GLwNginitCallback    "ginitCallback"
  65. #define GLwNresizeCallback    "resizeCallback"
  66. #define GLwNinputCallback    "inputCallback"
  67.  
  68. #define GLwNbufferSize        "bufferSize"
  69. #define GLwCBufferSize        "BufferSize"
  70. #define GLwNlevel        "level"
  71. #define GLwCLevel        "Level"
  72. #define GLwNrgba        "rgba"
  73. #define GLwCRgba        "Rgba"
  74. #define GLwNdoublebuffer    "doublebuffer"
  75. #define GLwCDoublebuffer    "Doublebuffer"
  76. #define GLwNstereo        "stereo"
  77. #define GLwCStereo        "Stereo"
  78. #define GLwNauxBuffers        "auxBuffers"
  79. #define GLwCAuxBuffers        "AuxBuffers"
  80. #define GLwNredSize        "redSize"
  81. #define GLwNgreenSize        "greenSize"
  82. #define GLwNblueSize        "blueSize"
  83. #define GLwCColorSize        "ColorSize"
  84. #define GLwNalphaSize        "alphaSize"
  85. #define GLwCAlphaSize        "AlphaSize"
  86. #define GLwNdepthSize        "depthSize"
  87. #define GLwCDepthSize        "DepthSize"
  88. #define GLwNstencilSize        "stencilSize"
  89. #define GLwCStencilSize        "StencilSize"
  90. #define GLwNaccumRedSize    "accumRedSize"
  91. #define GLwNaccumGreenSize    "accumGreenSize"
  92. #define GLwNaccumBlueSize    "accumBlueSize"
  93. #define GLwCAccumColorSize    "AccumColorSize"
  94. #define GLwNaccumAlphaSize    "accumAlphaSize"
  95. #define GLwCAccumAlphaSize    "AccumAlphaSize"
  96.  
  97. #ifdef __GLX_MOTIF
  98. typedef struct _GLwMDrawingAreaClassRec    *GLwMDrawingAreaWidgetClass;
  99. typedef struct _GLwMDrawingAreaRec    *GLwMDrawingAreaWidget;
  100.  
  101. extern WidgetClass glwMDrawingAreaWidgetClass;
  102. #else /* not __GLX_MOTIF */
  103. typedef struct _GLwDrawingAreaClassRec    *GLwDrawingAreaWidgetClass;
  104. typedef struct _GLwDrawingAreaRec    *GLwDrawingAreaWidget;
  105.  
  106. extern WidgetClass glwDrawingAreaWidgetClass;
  107. #endif
  108.  
  109. /* Callback reasons */
  110. #ifdef __GLX_MOTIF
  111. #define GLwCR_EXPOSE    XmCR_EXPOSE
  112. #define GLwCR_RESIZE    XmCR_RESIZE
  113. #define GLwCR_INPUT    XmCR_INPUT
  114. #else /* not __GLX_MOTIF */
  115. /* The same values as Motif, but don't use Motif constants */
  116. #define GLwCR_EXPOSE    38
  117. #define GLwCR_RESIZE    39
  118. #define GLwCR_INPUT    40
  119. #endif /* __GLX_MOTIF */
  120.  
  121. #define GLwCR_GINIT    32135    /* Arbitrary number that should neverr clash*/
  122.  
  123. typedef struct
  124. {
  125.     int     reason;
  126.     XEvent  *event;
  127.     Dimension width, height;        /* for resize callback */
  128. } GLwDrawingAreaCallbackStruct;
  129.  
  130. #if defined(__cplusplus) || defined(c_plusplus)
  131. extern "C" {
  132. #endif
  133.  
  134. /* front ends to glXMakeCurrent and glXSwapBuffers */
  135. extern void GLwDrawingAreaMakeCurrent (Widget w, GLXContext ctx);
  136. extern void GLwDrawingAreaSwapBuffers (Widget w);
  137.  
  138. #ifdef __GLX_MOTIF
  139. #ifdef _NO_PROTO
  140. extern Widget GLwCreateMDrawingArea ();
  141. #else /* _NO_PROTO */
  142.  
  143. extern Widget GLwCreateMDrawingArea (Widget parent, char *name,
  144.                      ArgList arglist, Cardinal argcount);
  145. #endif /* _NO_PROTO */
  146.  
  147. #endif /* __GLX_MOTIF */
  148.  
  149. #if defined(__cplusplus) || defined(c_plusplus)
  150. }
  151. #endif
  152.  
  153. #endif /* _GLwDrawA_h */
  154.